package org.ahuanlien.crm.mapper;

import org.ahuanlien.crm.domain.Role;
import org.ahuanlien.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    int queryForCount(QueryObject qo);

    List<Role> queryForList(QueryObject qo);

	void removePermissionRelation(Long id);

    void savePermissionRelation(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

	List<Long> getRoleIdByEmployeeId(Long employeeId);

	List<Long> getMenuIdByRoleId(Long roleId);

	void removeMenuRelation(Long id);

	void saveMenuRelation(@Param("roleId") Long roleId, @Param("menuId") Long menuId);

	List<String> getRoleNameByEmployeeId(Long id);
}